#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------


Func Doll_Button()

	$cstate1 = GUICtrlRead($Doll_Spell_1)
	$cstate2 = GUICtrlRead($Doll_Spell_2)
	$cstate3 = GUICtrlRead($Doll_Spell_3)
	$cstate4 = GUICtrlRead($Doll_Spell_4)
	$cstate5 = GUICtrlRead($Doll_Spell_5)
	$cstate6 = GUICtrlRead($Doll_Spell_6)
	$cstate7 = GUICtrlRead($Doll_Spell_7)
	$cstate8 = GUICtrlRead($Doll_Spell_8)
	
    If $cstate1 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate2 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate3 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate4 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate5 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate6 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate7 = $GUI_CHECKED then 
	    $Doll_data = GUICtrlRead($Doll_Delay_1)
	elseif $cstate8 = $GUI_CHECKED then 
		$Doll_data = GUICtrlRead($Doll_Delay_1)
	else
		$Doll_data = "-" & Sqrt($Doll_Delay_1*$Doll_Delay_1)
		MsgBox(0,"Lutie Tutie", "Smells Fresh and Fruite" & @LF & "Click OK if you agree")
	EndIf
	

	IniWrite ( "attackhack.ini", "Doll", "spelldelay", $Doll_data)

EndFunc

Func Doll_Spell()
;Poke 1
;Swarm 2
;Heal 3
;Curse4
;Scorch5
;Cure 6
;Grave Shackles7
;Life Drain8

	$cstate1 = GUICtrlRead($Doll_Spell_1)
	$cstate2 = GUICtrlRead($Doll_Spell_2)
	$cstate3 = GUICtrlRead($Doll_Spell_3)
	$cstate4 = GUICtrlRead($Doll_Spell_4)
	$cstate5 = GUICtrlRead($Doll_Spell_5)
	$cstate6 = GUICtrlRead($Doll_Spell_6)
	$cstate7 = GUICtrlRead($Doll_Spell_7)
	$cstate8 = GUICtrlRead($Doll_Spell_8)
	

	$special = ""
	If $cstate1 = $GUI_CHECKED Then
		$special = $special & "1"
	EndIf
	
	If $cstate2 = $GUI_CHECKED Then
		$special = $special & "2"
	EndIf

	If $cstate3 = $GUI_CHECKED Then
		$special = $special & "3"
	EndIf

	If $cstate4 = $GUI_CHECKED Then
		$special = $special & "4"
	EndIf
	
	If $cstate5 = $GUI_CHECKED Then
		$special = $special & "5"
	EndIf
	
	If $cstate6 = $GUI_CHECKED Then
		$special = $special & "6"
	EndIf
	
	If $cstate7 = $GUI_CHECKED Then
		$special = $special & "7"
	EndIf
	
	If $cstate8 = $GUI_CHECKED Then
		$special = $special & "8"
	EndIf

		IniWrite ( "attackhack.ini", "Doll", "specials", $special)

EndFunc

Func doll()
	If (WinActive("Pirates")) Then
		$dollinfo = IniReadSection("attackhack.ini", "doll" )
		$winpos = WinGetPos("Pirates")
		HotKeySet("{F3}")
		$activeWeapon = 3
		Sleep($dollinfo[2][1])
		Send("{F3}")
		HotKeySet("{F3}", "idle")
		
		While 1
			If (WinActive("Pirates")) Then
				PixelSearch(955 + $winpos[0],200 + $winpos[1],965 + $winpos[0], 395 + $winpos[1], 5782578, 5)
				If @error Then
					Send("{LCTRL}")
					Sleep($dollinfo[3][1])
				EndIf
					Send($dollinfo[1][1])
			EndIf
		WEnd
	EndIf
EndFunc